<script type="text/javascript">

	function validateForm(){
		var form = document.forms[0]; 
		if (form.userName.value == "")
			alert('Debe ingresar un nombre de usuario');	
		else if (form.password.value == "")
			alert('Debe ingresar un password');	
		else if (form.idProfile.value == "")
			alert('Debe seleccionar un perfil');	
		else if (form.idPerson.value == "")
			alert('Debe seleccionar una persona');					
		else
			form.submit();
	} 

	function cancelar() {
		window.location.href='<%=request.getContextPath() %>/userList.do';
	} 
</script>

<tr align="left" bgcolor="#F3F9FC">
	<td>Nombre de usuario:</td>
	<td><html:text property="userName" /></td>
</tr>
<tr>
	<td>Password:</td>
	<td><html:password property="password" /></td>
</tr>

<tr>	
	<td>Perfil:</td>
	<td>
		<html:select property="idProfile">
					<option value="">Seleccione...</option>
					<html:optionsCollection name="userEditForm" property="profiles" value="id" label="name"/> 
		</html:select>

	</td>
</tr>

<tr>	
	<td>Persona:</td>
	<td>
		<html:select property="idPerson">
					<option value="">Seleccione...</option>
					<html:optionsCollection name="userEditForm" property="persons" value="id" label="completeName"/> 
		</html:select>

	</td>
</tr>




